{extend name='base'/}
{block name='content'}
<ul class="breadcrumb no-border no-radius b-b b-light pull-in">
    <li><a href="index.html"><i class="fa fa-home"></i> Home</a></li>
    <li><a href="#">分类管理</a></li>
    <li class="active">分类列表</li>
</ul>
<div class="col-sm-12">
    <section class="panel panel-default">
        <header class="panel-heading font-bold">分类列表</header>
        <div class="panel-body">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"><a href="{:url('admin/category/addTop')}" class="btn btn-success btn-xs">添加顶级分类</a></h3>
                </div>

            </div>
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>分类id</th>
                    <th>分类名称</th>
                    <th>操作</th>
                </tr>
                </thead>
                {volist name="category" id="data"}
                <tbody>
                    <tr>
                        <td>{$data['cid']}</td>
                        <td>{$data['_cname']}</td>
                        <td>
                            <!-- Single button -->
                            <div class="btn-group">
                                <button type="button" class="btn btn-success btn-xs dropdown-toggle" data-toggle="dropdown">
                                    操作 <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu" role="menu">
                                    <li><a href="{:url('admin/category/addSon',['pid'=>$data['cid']])}">添加子分类</a></li>
                                    <li><a href="{:url('admin/category/edit',['cid'=>$data['cid']])}">编辑</a></li>
                                    <li><a href="{:url('admin/category/del',['cid'=>$data['cid']])}">删除</a></li>
                                </ul>
                            </div>

                        </td>
                    </tr>
                </tbody>
                {/volist}

            </table>
        </div>
    </section>
</div>
{/block}
